package com.mdd.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mdd.pojo.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mdd.pojo.request.BlogAddRequest;
import com.mdd.pojo.request.BlogQueryRequest;
import com.mdd.pojo.request.BlogReplyRequest;
import com.mdd.pojo.request.BlogUpdateRequest;
import com.mdd.pojo.vo.BlogVo;

/**
* @author 21958
* @description 针对表【blog】的数据库操作Service
* @createDate 2023-04-29 20:51:52
*/
public interface BlogService extends IService<Blog> {

    /**
     * 用户删除评价
     * @param id
     * @return
     */
    boolean removeBlog(Long id);

    /**
     * 用户写评价
     * @param blogAddRequest
     * @return
     */
    Long addBlog(BlogAddRequest blogAddRequest);

    /**
     * 用户修改评论
     * @param blogUpdateRequest
     * @return
     */
    boolean updateBlog(BlogUpdateRequest blogUpdateRequest);

    /**
     * 获取评价分页
     * @param blogQueryRequest
     * @return
     */
    Page<BlogVo> blogList(BlogQueryRequest blogQueryRequest);

    /**
     * 用户点赞
     * @param id
     * @return
     */
    boolean userLikeBlog(Long id);

    /**
     * 商家回复
     * @param blogReplyRequest
     * @return
     */
    boolean replyBlog(BlogReplyRequest blogReplyRequest);
}
